﻿<%@ Page Title="" Language="C#" MasterPageFile="blog.master" AutoEventWireup="true"
    CodeBehind="blog-details.aspx.cs" Inherits="SocialShare.Web.Blogs.blog_details" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <script src="<%= Utilities.SiteSettings.BaseUrl %>Scripts/colorbox/jquery.colorbox.js"></script>
    <link href="<%= Utilities.SiteSettings.BaseUrl %>Scripts/colorbox/colorbox.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $(".wincomments").colorbox({ width: "60%", height: "90%", iframe: true });
            $(".winwritecomments").colorbox({ width: "60%", height: "90%", iframe: true });
        });
    </script>
    <section class="grid_9">
    <asp:FormView ID="frvBlog" runat="server" DataSourceID="ObjectDataSource1" DefaultMode="ReadOnly"
        RenderOuterTable="false" OnDataBound="frvBlog_OnDataBound" >
        <ItemTemplate>
            <article>
            <section class="clearfix">
              <section class="forum-post-list-item-info margin-bottom-single">
              <span class="blog-post-title"> <%# Eval("PostTitle") %></span>
               <br />
                <%# String.Format("{0:D}",Eval("DateCreated"))%> | by <span class="blog-post-authorName"><%# this.GetUserName(Eval("UserId").ToString())%></span> | <span class="blog-post-tags">stashed in  <%# Eval("Tags")%></span>
              </section>
            </section>
           <section class="desc-featured-content forum-post-list-item">            
               <%# Eval("PostContent") %>              
           </section>
            </article>
            <section class="grid_9 socialshare-link alpha omega">
          <section class="grid_4 alpha">
          <iframe id="fbSharePost" src="" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px;" allowTransparency="true"></iframe>
          </section>
          <section class="grid_2 social-widget-margin">
           <g:plusone class="g-plusone" data-size="small" data-count="true"></g:plusone>
          </section>
          <section class="grid_2">
            <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
          </section>
          <section class="grid_1 omega comments-img">
           <a class="wincomments title" href='<%# Utilities.SiteSettings.BaseUrl+"blogs/show-comments.aspx?blogId="+Eval("BlogId").ToString() %>'><img src="<%= Utilities.SiteSettings.BaseUrl %>App_Style/Images/comments_icon.png" title="show comments" /></a>
            <a class="winwritecomments title" href='<%# Utilities.SiteSettings.BaseUrl+"blogs/submit-comments.aspx" %>'><img src="<%= Utilities.SiteSettings.BaseUrl %>App_Style/Images/comments-write.png" title="write comments" /></a>
          </section>
           </section>
        </ItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="GetBlogPostById" TypeName="SocialShare.DAL.Facades.BlogFacade">
        <SelectParameters>
            <asp:RouteParameter Name="blogId" RouteKey="blogId" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
    </section>

    <script type="text/javascript">

        $(document).ready(function () {
            LoadFBLike();
        });


        function LoadFBLike() {

            $("#fbSharePost").attr("src", "http://www.facebook.com/plugins/like.php?href=" + this.document.location + "&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=21");
        }
    </script>
</asp:Content>
